// pages/playlist-detail/index.js
const db = wx.cloud.database()
import {playerStore } from '../../store/index'
Page({
  data: {
    playlistInfo:{}
  },

  onLoad: function (options) {
    const id = options.id
  
    db.collection('collectionMenu').doc(id).get()
    .then(res =>{
     
      this.setData({
       playlistInfo:res.data
      })
    })

    
  },

  handleSongItemClick: function (event) {
    const index = event.currentTarget.dataset.index
    playerStore.setState("playListSongs", this.data.playlistInfo.collectionList.songInfo)
    playerStore.setState("playListIndex", index)
  },
})